package com.kanshu.mvp_basic.demo_user_info.model;

import android.util.SparseArray;

import com.kanshu.mvp_basic.demo_user_info.bean.UserBean;

public class UserModelImpl implements IUserModel {

    private SparseArray<UserBean> mUserArray = new SparseArray<>();

    @Override
    public void saveUser(int id, String userName, String userPwd) {
        mUserArray.append(id, new UserBean(userName, userPwd));
    }

    @Override
    public UserBean loadUser(int id) {
        return mUserArray.get(id, null);
    }
}
